Skip to content

fix: repair cross-package bugs so all tests and tsc pass - #96

Open
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2362-1785109986
Open

fix: repair cross-package bugs so all tests and tsc pass#96
stooit wants to merge 1 commit into
mainfrom
quantcode/e2e-tier3-2362-1785109986

Conversation

@stooit

@stooit stooit commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes all failing tests and type errors in the monorepo. All bugs spanned multiple packages. No test files were modified and no dependencies were added.

Verification: bun test packages/utils/test packages/ui/test apps/web/test --preload ./packages/ui/test/setup.ts13 pass / 0 fail, and tsc --noEmit0 errors.

Fixes

  1. Hook rename mismatchuseDebounce was renamed to useSearchDebounce in packages/utils (barrel export + git mv of the hook file), and the stale importer in apps/web/src/lib/api.ts was updated to match. The api.test.ts expectation of useSearchDebounce is the source of truth.
  2. Button accessibility — icon-only Button now forwards aria-label (and other rest props) to the underlying <button>, satisfying WCAG 4.1.2 (Button.test.tsx).
  3. Date formattingformatDate now renders day-first with no leading zero on the day (e.g. 1/03/2024) while keeping month two-digit, satisfying all assertions in date.test.ts.
  4. DataTable stale closure — fixed a stale-closure bug in the DataTable component caught by the controlled re-render test.
  5. tsconfig — added bun type declarations so tsc --noEmit no longer errors on import ... from "bun:test" in the test files (required for a clean type check).

Assumptions

  • The --preload ./packages/ui/test/setup.ts DOM setup (per the root test script) is the intended way to run the suite.
  • The tsconfig type addition is the minimal change needed to make tsc --noEmit clean on the pre-existing bun:test import errors.

- rename useDebounce -> useSearchDebounce and update apps/web importer
- forward aria-label/rest props on icon-only Button (WCAG 4.1.2)
- fix formatDate to en-AU day-first with no leading-zero day
- fix DataTable stale-closure controlled re-render bug
- add bun types to tsconfig so tsc --noEmit passes on test files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant